package com.ruoyi.shop.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 账号绑定信息对象 shop_user_openid
 * 
 * @author Alan Zhang
 * @date 2021-09-16
 */
public class ShopUserOpenid extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 账号绑定id */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 第三方类型：wechat，dingding，qq... */
    @Excel(name = "第三方类型")
    private String type;

    /** 第三方的openId的值 */
    @Excel(name = "第三方的openId的值")
    private String value;

    /** 可能用不到 */
    @Excel(name = "可能用不到")
    private String accessToken;

    /** access_token的过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "access_token的过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiredTime;

    /** session_key */
    @Excel(name = "session_key")
    private String sessionKey;

    /** 昵称 */
    @Excel(name = "昵称")
    private String nickname;

    /** 头像 */
    @Excel(name = "头像")
    private String avatar;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setValue(String value) 
    {
        this.value = value;
    }

    public String getValue() 
    {
        return value;
    }
    public void setAccessToken(String accessToken) 
    {
        this.accessToken = accessToken;
    }

    public String getAccessToken() 
    {
        return accessToken;
    }
    public void setExpiredTime(Date expiredTime) 
    {
        this.expiredTime = expiredTime;
    }

    public Date getExpiredTime() 
    {
        return expiredTime;
    }
    public void setSessionKey(String sessionKey) 
    {
        this.sessionKey = sessionKey;
    }

    public String getSessionKey() 
    {
        return sessionKey;
    }
    public void setNickname(String nickname) 
    {
        this.nickname = nickname;
    }

    public String getNickname() 
    {
        return nickname;
    }
    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("type", getType())
            .append("value", getValue())
            .append("accessToken", getAccessToken())
            .append("expiredTime", getExpiredTime())
            .append("sessionKey", getSessionKey())
            .append("nickname", getNickname())
            .append("avatar", getAvatar())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
